#include <tsin/library/DynamicParallelList.hpp>

#include <tsin/util/Logger.hpp>

using namespace tsin;

DynamicParallelList::DynamicParallelList()
{
}

DynamicObject *DynamicParallelList::copy()
{
        return DynamicObject::copy(new DynamicParallelList);
}

void DynamicParallelList::reinit()
{
        for (int i = 0; i < nrArguments; i++)
                arguments[i]->reinit();
}

DynamicEvent DynamicParallelList::postTick(void *data, void *priv_data)
{
        DynamicEvent event = EVENT_NONE;
        for (int i = 0; i < nrArguments; i++)
                event |= arguments[i]->postTick(data, priv_data);
        return event;
}

char DynamicParallelList::getDescriptor()
{
        if (nrArguments == 0)
                return '?';
        return arguments[0]->getDescriptor();
}
